Increase File Upload Size In WordPress

How To Increase File Upload Size Limit In WordPress

When you first install WordPress, you won’t be able to upload the file of the bigger size. You have to increase the limit of the upload.

Do you know how to increase file upload size in WordPress? In this tutorial, I am going to provide many ways which can help you to increase file upload size limit.

Many WordPress users get frustrated when they won’t able to upload the media files of bigger sizes. You don’t need to worry about it.

Increase File Upload Size In WordPress Using The .htaccess File.

To accomplish this task, you should know how to edit the .htaccess file from the cPanel. Whether you can do it by logging to the cPanel from your web hosting or you can use the FTP account.

There are many tools like FileZilla using which, you can access the data by connecting Filezilla server with the FTP server.

Open the file and click on edit option.

php_value upload_max_filesize 64M

php_value post_max_size 64M

php_value max_execution_time 300

php_value max_input_time 300

Add the code and save the file. Now you can check the file upload limit from your WordPress media uploader. It would be 64M.

Increase File Upload Size Limit Using the PHP.INI File.

There is another file present with all the files of WordPress. Just login to your cPanel and open the file manager. After that, you have to search for a file name php.ini.

If you’re using the PHP 4 then keep this file as it is. Otherwise, replace it with the php5.ini.

If you find this file then open it to edit. Otherwise, in some cases, you would find a file with only the PHP as the name. You have to check it by opening it.

upload_max_filesize 64M

post_max_size 64M

max_execution_time 300

Save the file and you are done.

Increase File Upload Size In WordPress Using The FUNCTIONS.PHP File.

If you know the WordPress theme file structure then you would be aware of the functions.php file. All the functions of the WordPress are included in this file.

You can find it along with other WordPress files after opening the file manager. Open the file to edit it.

@ini_set( ‘upload_max_size’, ’64M’ );

@ini_set( ‘post_max_size’, ’64M’ );

@ini_set( ‘max_execution_time, ‘300’ );

Save the file.

NOTE:- As you can see, all the codes contain the value “64M”. if you want to increase it then just replace it with another value like “128M”.

Increase File Upload Size Using Any Plugin.

There are many plugins which can be used to increase the file upload limit. Though most of the WordPress users go with the codes because of the easier path. But still, if you want to use any plugin, then go for it.

The WordPress plugin would do the same thing for you. It’s always recommended to keep the minimum number of plugins to your website and you won’t like to increase it.

Isn’t That Easy To Increase File Upload Size In WordPress?

All the possible ways have mentioned above. Now the choice is yours whether you go with the functions.php file, the .htaccess file, or with the plugin.

You would require any plugin only after the failure of all the codes. The best option is to edit the php.ini file because the phpMyAdmin is responsible for handling the media upload.

If you still face any problem, feel free to ask.

by Ravi Chahar

A WordPress Professional and the LinkedIn Influencer. A coder by passion and a blogger by choice. WordPress theme development is his forte. He is your WordPress guy who will teach you how to solve WordPress errors, WordPress security issues, design issues and what not.


Get Free Updates Into Your Inbox

Learn Everything Just Like I Did

SUBSCRIBE



2 comments

  1. I am on Godaddy and I was facing this problem since long. After hours of surfing on Internet I came to know that this problem can be fixed using the cPanel itself. In Godaddy, login in into the cPanel and going to the PHP version option, someone can find the option to increase the upload size limit of a file.

    I don’t know about the other hosts but for Godaddy it does work.

    1. Hey Tauseef,

      If you don’t find the PHP file then you can edit other files. The WordPress files remain as same on all the web hosts. It doesn’t matter whether you use Godaddy or any other web hosting.

      Thanks for stopping by.

      Enjoy the day.

      ~Ravi

Leave a Reply

Your email address will not be published. Required fields are marked *